//
//  AppDelegate.swift
//  新浪微博
//
//  Created by Lembo on 16/1/30.
//  Copyright © 2016年 apple. All rights reserved.
//

import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?


    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {

        setThemColor()
        // 实例化
        window = UIWindow(frame: UIScreen.mainScreen().bounds)
        window?.backgroundColor = UIColor.whiteColor()

        // 可视化
        window?.makeKeyAndVisible()
        
        // 设置根视图控制器
        window?.rootViewController = MainViewController()
        return true
    }
    
    private func setThemColor() {
        //必须提前设置  在控件被实例化之前就需要设置渲染颜色
        UINavigationBar.appearance().tintColor = themeColor
        UITabBar.appearance().tintColor = themeColor
    }



}

